#include<bits/stdc++.h>
using namespace std;
int main(){
	string s[1005];
	int n;
	cin>>n;
	int ans = 0;
	for(int i = 1;i <= n;i++){
		cin>>s[i];
		int o = 0;
		for(int j = 0;j < s[i].size();j++){
			if(s[i][j] == 'o')
				o = 1;
			if(s[i][j] == 'k' && o){
				ans++;
				break;
			}
		}
//		cout<<i<<" "<<ans<<endl;
	}
	cout<<ans;
	return 0;
}
